package Month07.day28;

import java.util.HashMap;
import java.util.Scanner;

public class test1 {
    public static void main(String[] args) {
        System.out.println("输入字符串!!");
        Scanner scanner = new Scanner(System.in);
        String sc = scanner.next();
        HashMap<Character, Integer> map = new HashMap<>();
        char[] chars = sc.toCharArray();
        for (char aChar : chars) {
            if (!map.containsKey(aChar)) {
                map.put(aChar, 1);
            } else {
                map.put(aChar, map.get(aChar) + 1);
            }
        }
        System.out.println(map);
    }
}
